Release 10.1A: OpenEdge Development:
Progress 4GL Reference
MAXIMUM function
Compares two or more values and returns the largest value.
Syntax
expressionA constant, field name, variable name, or expression. If there is a mixture of decimal and integer data types, decimal type is returned.
ExampleIn this procedure, if the credit-limit value is under 20,000, the procedure adds 10,000 to that value. Otherwise, the procedure sets credit-limit to 30,000. The MAXIMUM function determines the greater of the original credit-limit value and the new cred-lim2 value.
Notes
- When comparing character values, if at least one of the character fields is defined as case sensitive, then MAXIMUM treats all of the values as case sensitive for the sake of the comparisons. If none of the values is case sensitive, MAXIMUM treats lowercase letters as if they were uppercase letters.
- You can use MAXIMUM to compare DATE, DATETIME, and DATETIME-TZ data. The data type that contains less information (that is, a DATE value contains less information than a DATETIME value, and a DATETIME value contains less information than a DATETIME-TZ value) is converted to the data type with more information by setting the time value to midnight, and the time zone value to the session's time zone (when the data type does not contain the time or time zone). Comparisons with DATETIME-TZ data are based on Coordinated Universal Time (UTC) date and time.
See also
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |